package main

import (
	"context"
	"gitee.com/fowa/fowa-server/api/task"
	"gitee.com/fowa/fowa-server/pkg/client/triple"
)

import (
	"dubbo.apache.org/dubbo-go/v3/common/logger"
	_ "dubbo.apache.org/dubbo-go/v3/imports"
)

var impl = new(task.TaskServiceClientImpl)

// export DUBBO_GO_CONFIG_PATH= PATH_TO_SAMPLES/helloworld/go-client/conf/dubbogo.yml
func main() {
	//config.SetConsumerService(impl)
	//if err := config.Load(); err != nil {
	//	panic(err)
	//}
	if err := triple.Client(impl); err != nil {
		panic(err)
	}
	logger.Info("start to test dubbo")
	req := &task.Task{
		TaskName: "laurence",
	}
	reply, err := impl.Create(context.Background(), req)
	if err != nil {
		logger.Error(err)
	}
	logger.Infof("client response result: %v\n", reply)
}
